<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>云+-首页</title>
    <link rel="stylesheet" th:href="@{/front/lib/amazeui/assets/css/amazeui.css}" />
    <link rel="stylesheet" th:href="@{/front/css/hp.css}" />
    <script th:src="@{/front/js/layui/layui.js}"></script>
    <link rel="stylesheet" th:href="@{/front/js/layui/css/layui.css}">
    <script th:src="@{/front/lib/amazeui/assets/js/jquery.min.js}"></script>
    <script th:src="@{/front/lib/layer/layer.js}"></script>
    <script th:src="@{/front/lib/amazeui/assets/js/amazeui.js}"></script>
    <script th:src="@{/front/lib/amazeui/pagination/amazeui-pagination.js}"></script>
    <style>
        #footer {
            position: fixed;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 49px;
            line-height: 49px;
            z-index: 1010;
        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">云租房</div>
        <ul class="layui-nav layui-layout-left ">
            <li class="layui-nav-item" id="front_page"><a th:href="@{/front/head}">首页</a></li>
            <li class="layui-nav-item" id="real_estate"><a th:href="@{/front/main}">房源介绍</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">关于我们</a>
                <dl class="layui-nav-child">
                    <dd><a href="">肖初俊</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-username"></i>
                </a>
                <dl class="layui-nav-child">
                    <dd >
                        <a th:href="@{/front/one(uid=${session.user.uid})}">修改密码</a>
                    </dd>
                </dl>
            </li>
            <li class="layui-nav-item  ">
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-logout"></i>
                </a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/front/exit}">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>
</body>
<script>
    layui.use(['jquery'], function(){
        let $ = layui.jquery;
        let pathname = window.location.pathname;
        let page = pathname.substring(pathname.lastIndexOf('/'));
        if (page === '/head' || page === '/login'){     //导航栏选中状态
            $('#front_page').addClass('layui-this')
        }else if (page === '/main'){
            $('#real_estate').addClass('layui-this')
        }
    })
</script>
</html>